<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::IndexShardsTemplate&lt; IndexT &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html">IndexShardsTemplate</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="structfaiss_1_1IndexShardsTemplate-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::IndexShardsTemplate&lt; IndexT &gt; Struct Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="IndexShards_8h_source.html">IndexShards.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for faiss::IndexShardsTemplate&lt; IndexT &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="structfaiss_1_1IndexShardsTemplate.png" usemap="#faiss::IndexShardsTemplate&lt; IndexT &gt;_map" alt=""/>
  <map id="faiss::IndexShardsTemplate&lt; IndexT &gt;_map" name="faiss::IndexShardsTemplate&lt; IndexT &gt;_map">
<area href="classfaiss_1_1ThreadedIndex.html" alt="faiss::ThreadedIndex&lt; IndexT &gt;" shape="rect" coords="0,56,225,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a8d48a797bd827211a69c4f0a4cad1036"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d48a797bd827211a69c4f0a4cad1036"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>idx_t</b> = typename IndexT::idx_t</td></tr>
<tr class="separator:a8d48a797bd827211a69c4f0a4cad1036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada31784dde1b51d8be8b15288943c559"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada31784dde1b51d8be8b15288943c559"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>component_t</b> = typename IndexT::component_t</td></tr>
<tr class="separator:ada31784dde1b51d8be8b15288943c559"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94570791e9f70d2bef77d76564571417"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94570791e9f70d2bef77d76564571417"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>distance_t</b> = typename IndexT::distance_t</td></tr>
<tr class="separator:a94570791e9f70d2bef77d76564571417"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2ffc0edbce1815fae55cae188b83a5cf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a2ffc0edbce1815fae55cae188b83a5cf">IndexShardsTemplate</a> (bool threaded=false, bool successive_ids=true)</td></tr>
<tr class="separator:a2ffc0edbce1815fae55cae188b83a5cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac278d8f7d54923cb034127a4257c56b7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#ac278d8f7d54923cb034127a4257c56b7">IndexShardsTemplate</a> (idx_t d, bool threaded=false, bool successive_ids=true)</td></tr>
<tr class="separator:ac278d8f7d54923cb034127a4257c56b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0596f5ca67d6c9bfddae1465c5353b29"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a0596f5ca67d6c9bfddae1465c5353b29">IndexShardsTemplate</a> (int d, bool threaded=false, bool successive_ids=true)</td></tr>
<tr class="separator:a0596f5ca67d6c9bfddae1465c5353b29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47a2e1f78d91025857f483be3eb6828a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a47a2e1f78d91025857f483be3eb6828a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a47a2e1f78d91025857f483be3eb6828a">add_shard</a> (IndexT *index)</td></tr>
<tr class="memdesc:a47a2e1f78d91025857f483be3eb6828a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Alias for <a class="el" href="classfaiss_1_1ThreadedIndex.html#a9a11a672369d48f45cf1dd1bfe0dad87">addIndex()</a> <br/></td></tr>
<tr class="separator:a47a2e1f78d91025857f483be3eb6828a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0bff98885fecae6c42a474d05563ecd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0bff98885fecae6c42a474d05563ecd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#ae0bff98885fecae6c42a474d05563ecd">remove_shard</a> (IndexT *index)</td></tr>
<tr class="memdesc:ae0bff98885fecae6c42a474d05563ecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Alias for <a class="el" href="classfaiss_1_1ThreadedIndex.html#a21604d6b8b8d42e6cc78c26e85564027">removeIndex()</a> <br/></td></tr>
<tr class="separator:ae0bff98885fecae6c42a474d05563ecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45647579ff21e0945d8a87a97ec705fe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45647579ff21e0945d8a87a97ec705fe"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a45647579ff21e0945d8a87a97ec705fe">add</a> (idx_t n, const component_t *x) override</td></tr>
<tr class="memdesc:a45647579ff21e0945d8a87a97ec705fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">supported only for sub-indices that implement add_with_ids <br/></td></tr>
<tr class="separator:a45647579ff21e0945d8a87a97ec705fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15e0b4a2fd85f9345537d215a331ed91"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a15e0b4a2fd85f9345537d215a331ed91">add_with_ids</a> (idx_t n, const component_t *x, const idx_t *xids) override</td></tr>
<tr class="separator:a15e0b4a2fd85f9345537d215a331ed91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3698d94a2c039f445115d52c4545640"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3698d94a2c039f445115d52c4545640"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>search</b> (idx_t n, const component_t *x, idx_t k, distance_t *distances, idx_t *labels) const override</td></tr>
<tr class="separator:ab3698d94a2c039f445115d52c4545640"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7d268a8a30e16f52e192d41a57b8626"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa7d268a8a30e16f52e192d41a57b8626"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>train</b> (idx_t n, const component_t *x) override</td></tr>
<tr class="separator:aa7d268a8a30e16f52e192d41a57b8626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37e9d5d6d320b3711e2475b8b25f52b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37e9d5d6d320b3711e2475b8b25f52b1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>sync_with_shard_indexes</b> ()</td></tr>
<tr class="separator:a37e9d5d6d320b3711e2475b8b25f52b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classfaiss_1_1ThreadedIndex"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classfaiss_1_1ThreadedIndex')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classfaiss_1_1ThreadedIndex.html">faiss::ThreadedIndex&lt; IndexT &gt;</a></td></tr>
<tr class="memitem:ac603a659e678e154a49722bc428538e9 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac603a659e678e154a49722bc428538e9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ThreadedIndex</b> (bool threaded)</td></tr>
<tr class="separator:ac603a659e678e154a49722bc428538e9 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52a2c216ed16feb3be6a57e15253b368 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a52a2c216ed16feb3be6a57e15253b368"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ThreadedIndex</b> (int d, bool threaded)</td></tr>
<tr class="separator:a52a2c216ed16feb3be6a57e15253b368 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a11a672369d48f45cf1dd1bfe0dad87 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a9a11a672369d48f45cf1dd1bfe0dad87">addIndex</a> (IndexT *index)</td></tr>
<tr class="separator:a9a11a672369d48f45cf1dd1bfe0dad87 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21604d6b8b8d42e6cc78c26e85564027 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a21604d6b8b8d42e6cc78c26e85564027">removeIndex</a> (IndexT *index)</td></tr>
<tr class="separator:a21604d6b8b8d42e6cc78c26e85564027 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30ade89dc4e571868cf121e5592d6687 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a30ade89dc4e571868cf121e5592d6687">runOnIndex</a> (std::function&lt; void(int, IndexT *)&gt; f)</td></tr>
<tr class="separator:a30ade89dc4e571868cf121e5592d6687 inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada80f2e3319c96d9b0efb0259c8bbd5e inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada80f2e3319c96d9b0efb0259c8bbd5e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>runOnIndex</b> (std::function&lt; void(int, const IndexT *)&gt; f) const </td></tr>
<tr class="separator:ada80f2e3319c96d9b0efb0259c8bbd5e inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4536f6e7a8cce1f79bebc420ae1e909b inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a4536f6e7a8cce1f79bebc420ae1e909b">reset</a> () override</td></tr>
<tr class="separator:a4536f6e7a8cce1f79bebc420ae1e909b inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25aac2b3024e7f900687f85f625afaba inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25aac2b3024e7f900687f85f625afaba"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a25aac2b3024e7f900687f85f625afaba">count</a> () const </td></tr>
<tr class="memdesc:a25aac2b3024e7f900687f85f625afaba inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of sub-indices. <br/></td></tr>
<tr class="separator:a25aac2b3024e7f900687f85f625afaba inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d150a2d26d97b703af2a78e0c564c0e inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d150a2d26d97b703af2a78e0c564c0e"></a>
IndexT *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a9d150a2d26d97b703af2a78e0c564c0e">at</a> (int i)</td></tr>
<tr class="memdesc:a9d150a2d26d97b703af2a78e0c564c0e inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the i-th sub-index. <br/></td></tr>
<tr class="separator:a9d150a2d26d97b703af2a78e0c564c0e inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae84b4b14209700f372b9a82b78123f1a inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae84b4b14209700f372b9a82b78123f1a"></a>
const IndexT *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#ae84b4b14209700f372b9a82b78123f1a">at</a> (int i) const </td></tr>
<tr class="memdesc:ae84b4b14209700f372b9a82b78123f1a inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the i-th sub-index (const version) <br/></td></tr>
<tr class="separator:ae84b4b14209700f372b9a82b78123f1a inherit pub_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa79db16c723ae37eaf406e840e4f227a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa79db16c723ae37eaf406e840e4f227a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>successive_ids</b></td></tr>
<tr class="separator:aa79db16c723ae37eaf406e840e4f227a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_classfaiss_1_1ThreadedIndex"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classfaiss_1_1ThreadedIndex')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="classfaiss_1_1ThreadedIndex.html">faiss::ThreadedIndex&lt; IndexT &gt;</a></td></tr>
<tr class="memitem:a33201cb008802a729f61c76d519cb58a inherit pub_attribs_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33201cb008802a729f61c76d519cb58a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a33201cb008802a729f61c76d519cb58a">own_fields</a></td></tr>
<tr class="memdesc:a33201cb008802a729f61c76d519cb58a inherit pub_attribs_classfaiss_1_1ThreadedIndex"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether or not we are responsible for deleting our contained indices. <br/></td></tr>
<tr class="separator:a33201cb008802a729f61c76d519cb58a inherit pub_attribs_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a1d78dd47e9dc49488947e90dbc85e1ac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d78dd47e9dc49488947e90dbc85e1ac"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a1d78dd47e9dc49488947e90dbc85e1ac">onAfterAddIndex</a> (IndexT *index) override</td></tr>
<tr class="memdesc:a1d78dd47e9dc49488947e90dbc85e1ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called just after an index is added. <br/></td></tr>
<tr class="separator:a1d78dd47e9dc49488947e90dbc85e1ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0488d95e9d45e0cfab203c83e3a8e3c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0488d95e9d45e0cfab203c83e3a8e3c1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a0488d95e9d45e0cfab203c83e3a8e3c1">onAfterRemoveIndex</a> (IndexT *index) override</td></tr>
<tr class="memdesc:a0488d95e9d45e0cfab203c83e3a8e3c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called just after an index is removed. <br/></td></tr>
<tr class="separator:a0488d95e9d45e0cfab203c83e3a8e3c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_static_methods_classfaiss_1_1ThreadedIndex"><td colspan="2" onclick="javascript:toggleInherit('pro_static_methods_classfaiss_1_1ThreadedIndex')"><img src="closed.png" alt="-"/>&#160;Static Protected Member Functions inherited from <a class="el" href="classfaiss_1_1ThreadedIndex.html">faiss::ThreadedIndex&lt; IndexT &gt;</a></td></tr>
<tr class="memitem:a26c2b3a37f612f8654a855831ad828a6 inherit pro_static_methods_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26c2b3a37f612f8654a855831ad828a6"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>waitAndHandleFutures</b> (std::vector&lt; std::future&lt; bool &gt;&gt; &amp;v)</td></tr>
<tr class="separator:a26c2b3a37f612f8654a855831ad828a6 inherit pro_static_methods_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classfaiss_1_1ThreadedIndex"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classfaiss_1_1ThreadedIndex')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classfaiss_1_1ThreadedIndex.html">faiss::ThreadedIndex&lt; IndexT &gt;</a></td></tr>
<tr class="memitem:acb0dc6a321ad80636d5fef5cc7edd05b inherit pro_attribs_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb0dc6a321ad80636d5fef5cc7edd05b"></a>
std::vector&lt; std::pair&lt; IndexT <br class="typebreak"/>
*, std::unique_ptr<br class="typebreak"/>
&lt; <a class="el" href="classfaiss_1_1WorkerThread.html">WorkerThread</a> &gt; &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#acb0dc6a321ad80636d5fef5cc7edd05b">indices_</a></td></tr>
<tr class="memdesc:acb0dc6a321ad80636d5fef5cc7edd05b inherit pro_attribs_classfaiss_1_1ThreadedIndex"><td class="mdescLeft">&#160;</td><td class="mdescRight">Collection of <a class="el" href="structfaiss_1_1Index.html">Index</a> instances, with their managing worker thread if any. <br/></td></tr>
<tr class="separator:acb0dc6a321ad80636d5fef5cc7edd05b inherit pro_attribs_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1031b2c900e9ba53573e617539b3c488 inherit pro_attribs_classfaiss_1_1ThreadedIndex"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1031b2c900e9ba53573e617539b3c488"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1ThreadedIndex.html#a1031b2c900e9ba53573e617539b3c488">isThreaded_</a></td></tr>
<tr class="memdesc:a1031b2c900e9ba53573e617539b3c488 inherit pro_attribs_classfaiss_1_1ThreadedIndex"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this index multi-threaded? <br/></td></tr>
<tr class="separator:a1031b2c900e9ba53573e617539b3c488 inherit pro_attribs_classfaiss_1_1ThreadedIndex"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename IndexT&gt;<br/>
struct faiss::IndexShardsTemplate&lt; IndexT &gt;</h3>

<p><a class="el" href="structfaiss_1_1Index.html">Index</a> that concatenates the results from several sub-indexes </p>

<p>Definition at line <a class="el" href="IndexShards_8h_source.html#l00020">20</a> of file <a class="el" href="IndexShards_8h_source.html">IndexShards.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2ffc0edbce1815fae55cae188b83a5cf"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IndexT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html">faiss::IndexShardsTemplate</a>&lt; IndexT &gt;::<a class="el" href="structfaiss_1_1IndexShardsTemplate.html">IndexShardsTemplate</a> </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>threaded</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>successive_ids</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The dimension that all sub-indices must share will be the dimension of the first sub-index added</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">threaded</td><td>do we use one thread per sub_index or do queries sequentially? </td></tr>
    <tr><td class="paramname">successive_ids</td><td>should we shift the returned ids by the size of each sub-index or return them as they are? </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="IndexShards_8cpp_source.html#l00126">126</a> of file <a class="el" href="IndexShards_8cpp_source.html">IndexShards.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac278d8f7d54923cb034127a4257c56b7"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IndexT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html">faiss::IndexShardsTemplate</a>&lt; IndexT &gt;::<a class="el" href="structfaiss_1_1IndexShardsTemplate.html">IndexShardsTemplate</a> </td>
          <td>(</td>
          <td class="paramtype">idx_t&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>threaded</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>successive_ids</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">threaded</td><td>do we use one thread per sub_index or do queries sequentially? </td></tr>
    <tr><td class="paramname">successive_ids</td><td>should we shift the returned ids by the size of each sub-index or return them as they are? </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="IndexShards_8cpp_source.html#l00110">110</a> of file <a class="el" href="IndexShards_8cpp_source.html">IndexShards.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a0596f5ca67d6c9bfddae1465c5353b29"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IndexT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfaiss_1_1IndexShardsTemplate.html">faiss::IndexShardsTemplate</a>&lt; IndexT &gt;::<a class="el" href="structfaiss_1_1IndexShardsTemplate.html">IndexShardsTemplate</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>threaded</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>successive_ids</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>int version due to the implicit bool conversion ambiguity of int as dimension </p>

<p>Definition at line <a class="el" href="IndexShards_8cpp_source.html#l00118">118</a> of file <a class="el" href="IndexShards_8cpp_source.html">IndexShards.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a15e0b4a2fd85f9345537d215a331ed91"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IndexT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structfaiss_1_1IndexShardsTemplate.html">faiss::IndexShardsTemplate</a>&lt; IndexT &gt;::add_with_ids </td>
          <td>(</td>
          <td class="paramtype">idx_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const component_t *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const idx_t *&#160;</td>
          <td class="paramname"><em>xids</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Cases (successive_ids, xids):</p>
<ul>
<li>true, non-NULL ERROR: it makes no sense to pass in ids and request them to be shifted</li>
<li>true, NULL OK, but should be called only once (calls <a class="el" href="structfaiss_1_1IndexShardsTemplate.html#a45647579ff21e0945d8a87a97ec705fe" title="supported only for sub-indices that implement add_with_ids ">add()</a> on sub-indexes).</li>
<li>false, non-NULL OK: will call add_with_ids with passed in xids distributed evenly over shards</li>
<li>false, NULL OK: will call add_with_ids on each sub-index, starting at ntotal </li>
</ul>

<p>Definition at line <a class="el" href="IndexShards_8cpp_source.html#l00198">198</a> of file <a class="el" href="IndexShards_8cpp_source.html">IndexShards.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>/data/users/hoss/faiss/<a class="el" href="IndexShards_8h_source.html">IndexShards.h</a></li>
<li>/data/users/hoss/faiss/<a class="el" href="IndexShards_8cpp_source.html">IndexShards.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
